package com.cc.pojo.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import com.cc.infrastructure.db.UserAllTypeDb;

import java.math.BigDecimal;
import java.math.BigInteger;
import java.sql.Date;
import java.sql.Timestamp;
import java.sql.Time;


@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel("前端传递参数")
public class UserAllTypeDto {


  /**
   * id
   **/
  @ApiModelProperty("id")
  private String id;
  /**
   * 姓名
   **/
  @ApiModelProperty("姓名")
  private String name;
  /**
   * 年龄
   **/
  @ApiModelProperty("年龄")
  private Integer age;
  /**
   * 性别
   **/
  @ApiModelProperty("性别")
  private Boolean sex;
  /**
   * 身高
   **/
  @ApiModelProperty("身高")
  private Double height;
  /**
   * 体重
   **/
  @ApiModelProperty("体重")
  private Float weight;
  /**
   * 资金
   **/
  @ApiModelProperty("资金")
  private BigDecimal money;
  /**
   * 大数据
   **/
  @ApiModelProperty("大数据")
  private BigInteger dashuju;
  /**
   * 图片二进制
   **/
  @ApiModelProperty("图片二进制")
  private byte[] picture;
  /**
   * 生日
   **/
  @ApiModelProperty("生日")
  private Date birth;
  /**
   * 生日时间戳
   **/
  @ApiModelProperty("生日时间戳")
  private Timestamp birthStamp;
  /**
   * 生日time
   **/
  @ApiModelProperty("生日time")
  private Time birthTime;
  /**
   * json
   **/
  @ApiModelProperty("json")
  private String json;
  /**
   * 人物描述
   **/
  @ApiModelProperty("人物描述")
  private String description;
  /**
   * 人物描述_text
   **/
  @ApiModelProperty("人物描述_text")
  private String descriptionText;
  /**
   * 人物描述_tiny
   **/
  @ApiModelProperty("人物描述_tiny")
  private String descriptionTiny;
  /**
   *
   **/
  @ApiModelProperty("")
  private String otherTestByNullString;

  public static UserAllTypeDb convertUserAllTypeDbByUserAllTypeDto(UserAllTypeDto userAllTypeDto) {
    UserAllTypeDb useralltypedb = new UserAllTypeDb();
    useralltypedb.setId(userAllTypeDto.getId());
    useralltypedb.setName(userAllTypeDto.getName());
    useralltypedb.setAge(userAllTypeDto.getAge());
    useralltypedb.setSex(userAllTypeDto.getSex());
    useralltypedb.setHeight(userAllTypeDto.getHeight());
    useralltypedb.setWeight(userAllTypeDto.getWeight());
    useralltypedb.setMoney(userAllTypeDto.getMoney());
    useralltypedb.setDashuju(userAllTypeDto.getDashuju());
    useralltypedb.setPicture(userAllTypeDto.getPicture());
    useralltypedb.setBirth(userAllTypeDto.getBirth());
    useralltypedb.setBirthStamp(userAllTypeDto.getBirthStamp());
    useralltypedb.setBirthTime(userAllTypeDto.getBirthTime());
    useralltypedb.setJson(userAllTypeDto.getJson());
    useralltypedb.setDescription(userAllTypeDto.getDescription());
    useralltypedb.setDescriptionText(userAllTypeDto.getDescriptionText());
    useralltypedb.setDescriptionTiny(userAllTypeDto.getDescriptionTiny());
    useralltypedb.setOtherTestByNullString(userAllTypeDto.getOtherTestByNullString());
    return useralltypedb;
  }
}